<?php

declare (strict_types=1);
namespace App\Model;

/**
 * @property int $id 
 * @property int $shop_id 
 * @property int $resource_id 
 * @property int $type 
 */
class FlyShopSet extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fly_shop_sets';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'shop_id' => 'integer', 'resource_id' => 'integer', 'type' => 'integer'];


    /**
     * 获取行业详情
     * @return object
     */
    public function industry_info()
    {
        return $this->belongsTo(Industry::class, 'resource_id', 'id')->select(['id','industry_name']);
    }

}